<%-- 
    Document   : newshow
    Created on : 2014-4-4, 14:29:15
    Author     : lcfgly
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page trimDirectiveWhitespaces="true" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
        <title>${userinfo.users.uname} 渔具价格，渔具报价</title>
        <%@include file="/WEB-INF/jspf/view/css.jspf" %>
        <link rel="stylesheet" href="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.css" />
        <style>
            *, *:before, *:after{
                box-sizing:content-box;
            }
        </style>
    </head>
    <body style="padding-top:50px;min-width:900px;">
        <jsp:include page="/header/${userinfo.users.uid}.html" />
        <div class="bodyinfo">
            <div class="container contentbody" style="box-sizing: border-box;"> 
                <ol class="breadcrumb">
                    <li><a href="<c:url value="/shop/${userinfo.users.username}.html" />">首页</a></li>
                    <li class="active">地图导航</li>
                </ol>

                <!--中部-->
                <div class="col-md-12 nopadding">
                    <!--中部左侧-->
                    <div class="col-md-3 nopadding marginright10 marginbottom10"  style="max-width:275px">
                        <div class="bgwhite marginbottom10 leftbox">
                            <div class="boxborder">
                                <div class="bottomdotted"><span class="title">${userinfo.users.uname}</span></div>
                                <ul class="nopadding">
                                    <li>店铺名称：<span>${userinfo.users.uname}</span></li>
                                    <li>电子邮件：<span>${userinfo.userinfer.email}</span></li>
                                    <li>固定电话：<span>${userinfo.userinfer.tel}</span></li>
                                    <li>手机：<span>${userinfo.userinfer.phone}</span></li>
                                    <li>地址：<span>${useraddress}${userinfo.userinfer.address}</span></li>
                                </ul>
                            </div>
                        </div>
                         <div class="bgwhite marginbottom10 leftbox">
                             <span class="title">导航信息【<a href="#" id="clearmap">清除</a>】</span>
                            <div id="panel"></div>
                        </div>
                    </div>
                    <!--中部左侧-->
                    <!--中部右侧-->
                    <div class="col-md-9 nopadding marginbottom10">
                        <!--最新报价-->
                        <div class="titleline" style="box-sizing: border-box;">
                            地图导航
                        </div>
                        <div class="bgwhite arcinfo">
                            <div  id="container" style="height:600px;width:100">
                            </div>
                        </div>
                        <!--end最新报价-->
                    </div>
                    <!--end中部右侧-->
                </div>
                <!--end中部-->
            </div>
            <%@include file="/WEB-INF/jspf/view/foot.jspf" %>
            <!--[if lte IE 8]><script src="<c:url value="/js/helpers/excanvas.min.js" />"></script><![endif]-->
            <script src="<c:url value="/js/vendor/jquery-1.9.1.min.js" />"></script>
            <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.5&ak=GUk14zGfe4WxVaKLqGWsC8Mz"></script>
            <script type="text/javascript" src="http://api.map.baidu.com/library/SearchInfoWindow/1.5/src/SearchInfoWindow_min.js"></script>
            <script>
                var map = new BMap.Map("container");          // 创建地图实例  
                var point = new BMap.Point(${userinfo.userinfer.lng}, ${userinfo.userinfer.lat});  // 创建点坐标  
                var marker = new BMap.Marker(point);
                map.centerAndZoom(point, 18);                 // 初始化地图，设置中心点坐标和地图级别
                map.enableScrollWheelZoom();
                map.addControl(new BMap.NavigationControl());
                map.addControl(new BMap.ScaleControl());
                map.addControl(new BMap.OverviewMapControl());
                map.addControl(new BMap.MapTypeControl());
                map.addOverlay(marker);
                var searchInfoWindow = new BMapLib.SearchInfoWindow(map,  '<p style="font-size:12px;">${useraddress}${userinfo.userinfer.address}</p>', {
                    title: "<span style='color:#f98700'>${userinfo.users.uname}</span>", //标题
                    width: 290, //宽度
                    panel: "panel", //检索结果面板
                    enableAutoPan: true, //自动平移
                    searchTypes: [
                        BMAPLIB_TAB_TO_HERE, //到这里去
                        BMAPLIB_TAB_FROM_HERE //从这里出发
                    ]
                });
                searchInfoWindow.open(point);
                marker.addEventListener("click", function() {
                    searchInfoWindow.open(point);
                    flag=true;
                });
               $("#clearmap").click(function(){
                    searchInfoWindow.open(point);
                    return false;
                });
            </script>
        </div>
    </body>
</html>

